// +----------------------------------------------------------------------
// | xx [ xx赋能开发者，方便快捷开发]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.xxx.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed xx并不是自由软件，未经许可不能去掉xx相关版权
// +----------------------------------------------------------------------
// | Author: xx Team <xx@xx.com>
// +----------------------------------------------------------------------
// | Description:    布局配置
// +----------------------------------------------------------------------
import { defineStore } from "pinia";

export const useMediaStore = defineStore("media", {
  // export const useMediaStore = defineStore("media", {
  state: () => ({
    isMobile: false, // 是否为手机
    isTablet: false, // 是否为平板
    isDesktop: true, // 是否为桌面
    isFullscreen: false, // 是否切换到了全屏
  }),
  actions: {
    setDevice(type) {
      this.isMobile = false;
      this.isTablet = false;
      this.isDesktop = false;
      this[`is${type}`] = true;
    },
  },
});
